<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改供应商货箱前缀管理')" />
    <th:block th:include="include :: select2-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-prefix-edit" th:object="${supplierBoxPrefix}">
            <input name="id" th:field="${supplierBoxPrefix.id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">货箱前缀：</label>
                <div class="col-sm-8">
                    <input name="prefix" th:field="${supplierBoxPrefix.prefix}" class="form-control" type="text" disabled>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">货箱生产商：</label>
                <div class="col-sm-8">
                    <!--<input name="supplierCode" th:field="*{supplierCode}" class="form-control" type="text" disabled>-->
                    <select id="supplierCode" name="supplierCode" class="form-control select2-multiple">
                        <option th:each="model:${list}" th:value="${model.userId}" th:text="${model.nameInfo}" th:selected="${supplierBoxPrefix.id == model.userId}"></option>
                    </select>
                </div>
            </div>
            <!--<div class="form-group">
                <label class="col-sm-3 control-label">是否被占用：</label>
                <div class="col-sm-8">
                    <input name="occupy" th:field="${supplierBoxPrefix.occupy}" class="form-control" type="text" disabled>
                </div>
            </div>-->
            <div class="form-group">    
                <label class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-8">
                    <input name="remark" th:field="${supplierBoxPrefix.remark}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: select2-js" />
    <script th:inline="javascript">
        var prefix = ctx + "system/prefix";
        $("#form-prefix-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-prefix-edit').serialize());
            }
        }
    </script>
</body>
</html>